home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_qt3.idb / usr / freeware / Qt / examples / tooltip / tooltip.h.z / tooltip.h
C/C++ Source or Header  |  2002-04-08  |  972b  |  45 lines

  1. /****************************************************************************
  2. ** $Id:  qt/tooltip.h   3.0.3   edited Oct 12 12:18 $
  3. **
  4. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  5. **
  6. ** This file is part of an example program for Qt.  This example
  7. ** program may be used, distributed and modified without limitation.
  8. **
  9. *****************************************************************************/
  10.  
  11. #include <qwidget.h>
  12. #include <qtooltip.h>
  13.  
  14.  
  15. class DynamicTip : public QToolTip
  16. {
  17. public:
  18.     DynamicTip( QWidget * parent );
  19.  
  20. protected:
  21.     void maybeTip( const QPoint & );
  22. };
  23.  
  24.  
  25. class TellMe : public QWidget
  26. {
  27.     Q_OBJECT
  28. public:
  29.     TellMe( QWidget * parent = 0, const char * name = 0 );
  30.     ~TellMe();
  31.  
  32.     QRect tip( const QPoint & );
  33.  
  34. protected:
  35.     void paintEvent( QPaintEvent * );
  36.     void mousePressEvent( QMouseEvent * );
  37.     void resizeEvent( QResizeEvent * );
  38.  
  39. private:
  40.     QRect randomRect();
  41.  
  42.     QRect r1, r2, r3;
  43.     DynamicTip * t;
  44. };
  45.